package com.ideal.frame.sys.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ideal.frame.entity.AutoModel;
import lombok.Data;

import javax.persistence.*;

@Data
@Entity
@Table(name = "t_sys_role_menu")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class SysRoleMenu extends AutoModel {

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "role_id")
    private SysRole sysRole;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "menu_id")
    private SysMenu sysMenu;
}
